Table of contents
« CSS « CSS Reference
The :active pseudo-class matches when an element is being activated by the user. It allows the page to give a feedback that the activation has been detected by the browser. When interacting with a mouse, this is typically the time between the user presses the mouse button and releases it. It is often used on
<a> and
<button> HTML elements.
Note: on system with mice having several buttons, CSS 3 specifies that the
:active pseudo-class must only apply to the primary button, typically the left-most button on mice for right-handed.Browser compatibility
| Browser | Lowest Version |
|---|---|
| Internet Explorer | 4.0 (only for <a>) |
| Firefox | 1.0 |
| Opera | 5.0 (only for <a>)7.0 |
| Safari | 1.0 |